home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
Magnum One
/
Magnum One (Mid-American Digital) (Disc Manufacturing).iso
/
d7
/
lanuts.arc
/
SENDTEST.C
< prev
next >
Wrap
Text File
|
1991-10-30
|
1KB
|
55 lines
#include <stdio.h>
#include <stdlib.h>
#include <string.h>
#include <dos.h>
#include <direct.h>
#include <conio.h>
#include "lantasti.h"
#define DOS 0x21
#define NETBIOS 0x5C
/* structure to allow easy access to both segment and offset portions of
far pointers */
/* definitions to save typing time */
struct msg_buffer msg;
struct SREGS segregs;
union REGS registers;
struct SEGOFFS {
unsigned offs;
unsigned seg;
};
typedef union POINTER {
unsigned char *ptr;
struct SEGOFFS l;
} POINTER;
union POINTER ptr;
/* main ********************************************************************
*****************************************************************************/
int main(argc,argv)
int argc;
char *argv[];
{
if (argc < 2) {
puts("Usage: sendtest machine message.");
exit(FALSE);
}
ptr.ptr = &msg; /* set up structure for message */
strcpy(msg.text,argv[1]);
strcpy(msg.destination,argv[0]);
segregs.ds = ptr.l.seg; /* set up regs for interrupt call */
registers.x.si = ptr.l.offs;
registers.x.ax = 0x5f98;
for(i = 0; i < 65535; i++) intdosx(®isters,®isters,&segregs);
/* outta there */
return(0);
}